<script setup>
import home from '../../assets/lottie/home.json'
import personal from '../../assets/lottie/personal.json'
import apply from '../../assets/lottie/apply.json'
import setting from '../../assets/lottie/setting.json'
import tag from '../../assets/lottie/tag.json'
import database from '../../assets/lottie/database.json'
import message from '../../assets/lottie/messqge.json'

</script>

<template>
  <div class="layout-box grid-box fit">
    <div class="menu-list">
      <div class="menu-item">
        <div class="lottie-icon" v-lottie="home"></div>
        <div class="menu-name">首页</div>
      </div>
      <div class="menu-item">
        <div class="lottie-icon" v-lottie="apply"></div>
        <div class="menu-name">应用中心</div>
      </div>
      <div class="menu-item">
        <div class="lottie-icon" v-lottie="database"></div>
        <div class="menu-name">数据处理</div>
      </div>
      <div class="menu-item">
        <div class="lottie-icon" v-lottie="tag"></div>
        <div class="menu-name">标签管理</div>
      </div>
      <div class="menu-item">
        <div class="lottie-icon" v-lottie="message"></div>
        <div class="menu-name">消息中心</div>
      </div>
      <div class="menu-item">
        <div class="lottie-icon" v-lottie="personal"></div>
        <div class="menu-name">个人中心</div>
      </div>
      <div class="menu-item">
        <div class="lottie-icon" v-lottie="setting"></div>
        <div class="menu-name">系统设置</div>
      </div>
    </div>
    <div class="content-box">
      <RouterView :key="$route.fullPath"></RouterView>
    </div>
  </div>
</template>

<style scoped>
.grid-box {
  display: grid;
  grid-template-columns: 80px 1fr;
}
.lottie-icon {
  width: 50px;
  height: 50px;
  margin: auto;
}
.content-box {
  display: grid;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.4);
  margin: 4px 4px 4px 0;
  background: #ffffff;
}
.menu-list {
  padding: 12px 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(auto-fill, 76px);
}
.menu-item {
  width: 68px;
  height: 68px;
  cursor: pointer;
  margin: auto;
  border-radius: 8px;
}
.menu-item:hover {
  background: #ffffff;
}
.menu-name {
  font-size: 12px;
  color: #667085;
  transform: translateY(-4px);
  font-family: microsoft yahei;
}
</style>
